package io.finer.erp.jeecg.stock.mapper;

import java.math.BigDecimal;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import io.finer.erp.jeecg.bas.dto.FqDTO;
import io.finer.erp.jeecg.stock.entity.ChangeStoreInventory;
import io.finer.erp.jeecg.stock.entity.StkInventory;

/**
 * @Description: 库存
 * @Author: jeecg-boot
 * @Date:   2020-04-11
 * @Version: V1.0
 */
public interface StkInventoryMapper extends BaseMapper<StkInventory> {
	
	List<ChangeStoreInventory> getInventoryOrderByName(@Param("materialIds")List<String> materialIds);

	List<FqDTO> getFqParameter(@Param("width")BigDecimal width, @Param("length")BigDecimal length, @Param("categoryId")String categoryId);

	List<StkInventory> selectByMaterials(@Param("materialIds")List<String> materialIds);
	
	Page<StkInventory> getInventory(IPage<StkInventory> page,@Param("ids")List<String> ids,
			@Param("warehouseId")String warehouseId,@Param("supplierId")String supplierId,
			@Param("isClosed")String isClosed,@Param("batchNoBegin")String batchNoBegin,
			@Param("batchNoEnd")String batchNoEnd, @Param("createTime")String createTime);

	int countHasInventoryMateiral(@Param("materialIds")List<String> materialIds);
}
